package com.baizhi.entity;

import java.io.Serializable;
//对应MySQL中t_person表的前两个字段  id   name   redis数据库的练习
//需要实现序列化接口才能将该对象序列化
public class Person implements Serializable {
    private Integer id;
    private String name;
    private Integer count;//增加一个属性  统计redis数据库中存储的投票数

    public Person(Integer id, String name, Integer count) {
        this.id = id;
        this.name = name;
        this.count = count;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", count=" + count +
                '}';
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Person() {
    }

    public Person(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
